import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const columns: BasicColumn[] = [
    {
    title: '容器名称',
    dataIndex: 'idsName'
   },
   {
    title: '文件流',
    dataIndex: 'fileraw'
   },
   {
    title: '创建容器时间',
    dataIndex: 'createTiime'
   },
   {
    title: '删除容器时间',
    dataIndex: 'deleteTime'
   },
   {
    title: '是否删除标志',
    dataIndex: 'delFlag'
   },
   {
    title: '创建者',
    dataIndex: 'creator'
   },
   {
    title: '更新人',
    dataIndex: 'updater'
   },
];

export const searchFormSchema: FormSchema[] = [
 {
    label: '容器名称',
    field: 'idsName',
    component: 'Input'
  },
 {
    label: '文件流',
    field: 'fileraw',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {label: '', field: 'id', component: 'Input', show: false},
  {
    label: '容器名称',
    field: 'idsName',
    component: 'Input',
  },
  {
    label: '文件流',
    field: 'fileraw',
    component: 'Input',
  },
  {
    label: '创建容器时间',
    field: 'createTiime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD hh:mm:ss',
    },
  },
  {
    label: '删除容器时间',
    field: 'deleteTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD hh:mm:ss',
    },
  },
  {
    label: '是否删除标志',
    field: 'delFlag',
    component: 'Input',
  },
  {
    label: '创建者',
    field: 'creator',
    component: 'Input',
  },
  {
    label: '更新人',
    field: 'updater',
    component: 'Input',
  },
];
